package com.bjqh.edu.Bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2017/9/18.
 */

public class Grade implements Parcelable {


    /**
     * total : 0
     * status : 200
     * rows : [{"uid":"","total":"","id":6,"time":1505573532000,"flag":0,"contentid":"9,10,11","page":"","name":"2年级","img":"/sys/menu/1505573531720.png","cname":"英语,数学,语文","rows":""},{"uid":"","total":"","id":7,"time":1505572901000,"flag":0,"contentid":"9,10,11","page":"","name":"3年级","img":"/sys/menu/1505572900670.png","cname":"数学,语文,英语","rows":""},{"uid":"","total":"","id":8,"time":1505573200000,"flag":0,"contentid":"9,10,11","page":"","name":"4年级","img":"/sys/menu/1505573199914.png","cname":"英语,数学,语文","rows":""},{"uid":"","total":"","id":9,"time":1505573114000,"flag":0,"contentid":"9,10,11","page":"","name":"6年级","img":"/sys/menu/1505573114351.png","cname":"数学,语文,英语","rows":""},{"uid":"","total":"","id":10,"time":1505573227000,"flag":0,"contentid":"9,10,11,12,14,13","page":"","name":"8年级","img":"/sys/menu/1505573226915.png","cname":"英语,生物,数学,政治,语文,物理","rows":""},{"uid":"","total":"","id":11,"time":1505573302000,"flag":0,"contentid":"9,10,11,12,14,13","page":"","name":"1年级","img":"/sys/menu/1505573301768.png","cname":"生物,数学,政治,语文,物理,英语","rows":""},{"uid":"","total":"","id":12,"time":1505573370000,"flag":0,"contentid":"9,10,11,12,14,13","page":"","name":"9年级","img":"/sys/menu/1505573369602.png","cname":"生物,英语,数学,政治,语文,物理","rows":""}]
     */

    private int total;
    private String status;
    private List<RowsBean> rows;

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public List<RowsBean> getRows() {
        return rows;
    }

    public void setRows(List<RowsBean> rows) {
        this.rows = rows;
    }

    public static class RowsBean implements Parcelable {
        /**
         * uid : ""
         * total : ""
         * id : 6
         * time : 1505573532000
         * flag : 0
         * contentid : 9,10,11
         * page : ""
         * name : 2年级
         * img : /sys/menu/1505573531720.png
         * cname : 英语,数学,语文
         * rows : ""
         */

        private String uid;
        private String total;
        private String id;
        private long time;
        private int flag;
        private String contentid;
        private String page;
        private String name;
        private String img;
        private String cname;
        private String rows;

        public String getUid() {
            return uid;
        }

        public void setUid(String uid) {
            this.uid = uid;
        }

        public String getTotal() {
            return total;
        }

        public void setTotal(String total) {
            this.total = total;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public long getTime() {
            return time;
        }

        public void setTime(long time) {
            this.time = time;
        }

        public int getFlag() {
            return flag;
        }

        public void setFlag(int flag) {
            this.flag = flag;
        }

        public String getContentid() {
            return contentid;
        }

        public void setContentid(String contentid) {
            this.contentid = contentid;
        }

        public String getPage() {
            return page;
        }

        public void setPage(String page) {
            this.page = page;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getImg() {
            return img;
        }

        public void setImg(String img) {
            this.img = img;
        }

        public String getCname() {
            return cname;
        }

        public void setCname(String cname) {
            this.cname = cname;
        }

        public String getRows() {
            return rows;
        }

        public void setRows(String rows) {
            this.rows = rows;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.uid);
            dest.writeString(this.total);
            dest.writeString(this.id);
            dest.writeLong(this.time);
            dest.writeInt(this.flag);
            dest.writeString(this.contentid);
            dest.writeString(this.page);
            dest.writeString(this.name);
            dest.writeString(this.img);
            dest.writeString(this.cname);
            dest.writeString(this.rows);
        }

        public RowsBean() {
        }

        protected RowsBean(Parcel in) {
            this.uid = in.readString();
            this.total = in.readString();
            this.id = in.readString();
            this.time = in.readLong();
            this.flag = in.readInt();
            this.contentid = in.readString();
            this.page = in.readString();
            this.name = in.readString();
            this.img = in.readString();
            this.cname = in.readString();
            this.rows = in.readString();
        }

        public static final Creator<RowsBean> CREATOR = new Creator<RowsBean>() {
            @Override
            public RowsBean createFromParcel(Parcel source) {
                return new RowsBean(source);
            }

            @Override
            public RowsBean[] newArray(int size) {
                return new RowsBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.total);
        dest.writeString(this.status);
        dest.writeList(this.rows);
    }

    public Grade() {
    }

    protected Grade(Parcel in) {
        this.total = in.readInt();
        this.status = in.readString();
        this.rows = new ArrayList<RowsBean>();
        in.readList(this.rows, RowsBean.class.getClassLoader());
    }

    public static final Parcelable.Creator<Grade> CREATOR = new Parcelable.Creator<Grade>() {
        @Override
        public Grade createFromParcel(Parcel source) {
            return new Grade(source);
        }

        @Override
        public Grade[] newArray(int size) {
            return new Grade[size];
        }
    };
}
